<?php

class Admin_Form_Newport extends Zend_Form {

    public function init() {
        parent::init();
        $this->initFields();
    }

    public function initFields() {
        $elements = array();
        
        $name = new Zend_Form_Element_Text("name");
        $name->setRequired();
        $elements[] = $name;
        
        $description = new Zend_Form_Element_Textarea("description");
        $description->setRequired();
        $elements[] = $description;
        
        $latitude = new Zend_Form_Element_Text("latitude");
        $latitude->addValidator(new Zend_Validate_Float())
                 ->setRequired();
        $elements[] = $latitude;
        
        $longitude = new Zend_Form_Element_Text("longitude");
        $longitude->addValidator(new Zend_Validate_Float())
                 ->setRequired();
        $elements[] = $longitude;
        
        $this->addElements($elements);
    }

}

?>
